package com.education.wisdom.controller.app;


import com.education.common.utils.ApiReturnObject;
import com.education.wisdom.pojo.CommentsLive;
import com.education.wisdom.service.ICommentsLiveService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 *  职业达人视频 评论
 */
@Controller
@CrossOrigin
@Slf4j
@ResponseBody
@Api(tags = {"职业达人视频"})
@RequestMapping("/appCommentsLive")
public class AppCommentsLive {

    @Autowired
    private ICommentsLiveService commentsLiveService;

    /**
     *  查询职业达人视频评论列表
     */
    @GetMapping("list")
    public ApiReturnObject list(CommentsLive commentsLive){

       return new ApiReturnObject("200","查询成功",null);
   }

    /**
     *  添加职业达人视频评论
     */
   @PostMapping("add")
   public ApiReturnObject add(CommentsLive commentsLive){

      return new ApiReturnObject("200","添加成功","");
  }

    /**
     *  修改职业达人视频
     */
  @PostMapping("update")
  public ApiReturnObject update(CommentsLive commentsLive ){
     if(commentsLive.getPlId() != null ){

         return new ApiReturnObject("200","修改成功","");
     }
     return new ApiReturnObject("201","缺少参数id","");
 }

    /**
     *  删除职业大人视频评论
     */
 @PostMapping("del")
 public ApiReturnObject del(CommentsLive commentsLive){
    if(commentsLive.getPlId() != null){
        commentsLiveService.deleteCommentsLiveById(commentsLive.getPlId().toString());
        return new ApiReturnObject("200","删除成功","");
    }
    return new ApiReturnObject("201","缺少参数","");
}


}
